package com.cmy;

    public class Student01 {
        private int id;
        private String name;

    public Student01() {
    }

    public Student01(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    public void equals(Student01 stu1,Student01 stu2) {

       if (stu1.getName().equals(stu2.name)&&stu1.getId()==stu2.getId()){
           System.out.println("是一个学生");
       }else {
           System.out.println("不是同一个学生");
       }

    }
}
